package com.qf.service.impl;

import com.qf.dao.AccountDao;
import com.qf.service.AccountService;

/**
 * @author YDW
 * projectName:project2202_3
 * time:2022/5/6 11:44
 * description:
 */
public class AccountServiceImpl implements AccountService {

    AccountDao accountDao;

    public void setAccountDao(AccountDao accountDao) {
        this.accountDao = accountDao;
    }

    @Override
    public void transfer(Integer fromId, Integer toId, Double money)  {
        accountDao.losemoney(fromId,money);
//        int i=1/0;
        accountDao.getmoney(toId,money);
    }
}
